package com.bigchui.DesignPattern.Singleton.hungry;

/**
 * 饿汉式单例
 * Created by wangzhen on 2019/3/9.
 */
public class HungrySingleton {
    private HungrySingleton(){

    }
    private static final HungrySingleton HUNGRY_SINGLETON;
    static{
        HUNGRY_SINGLETON=new HungrySingleton();
    }
    public static HungrySingleton getInstance(){
        return HUNGRY_SINGLETON;
    }
}
